package com.example.repair_service.mapper;

import com.example.repair_service.entity.UserEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.boot.autoconfigure.security.SecurityProperties;


@Mapper
public interface UserMapper {

    @Select("select * from user where mobile = #{mobile}")
    UserEntity getByMobile(String mobile);

    @Insert("insert into user(mobile,password,username,avatar) values (#{mobile},#{password},#{username},#{avatar})")
    void register(UserEntity user);

    void setLastLoginAt(UserEntity user);
}
